<?php

class Nuo_Form_Decorator_Div3Wrapper extends Zend_Form_Decorator_Abstract
{
	/**
	 * Default placement: surround content
	 * @var string
	 */
	protected $_placement = null;

	/**
	 * Render
	 *
	 * Renders as the following:
	 * <dt></dt>
	 * <dd>$content</dd>
	 *
	 * @param  string $content
	 * @return string
	 */
	public function render($content)
	{
		$elementName = $this -> getElement() -> getName();

		$options = $this -> getOptions();
		$translate = $this -> getElement() -> getTranslator();
		$label = null;
		
		if ($translate && isset($options['label']))
		{
			$label = $translate -> translate($options['label']);
		}

		return 
		  '<div id="' . $elementName . '-wrapper" class="form-wrapper">' 
		. $label?('<div id="' . $elementName . '-label" class="form-label">' . $label . '</div>'):'' 
		. '<div id="' . $elementName . '-element" class="form-element">' . $content . '</div>' 
		. '</div>';
	}

}
